package com.it.sun.esaychat.user.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.Set;


/**
 * @author Lenovo
 */
@Data
@Accessors(chain = true)
@TableName("e_chat_sys_user")
@ApiModel(value = "UserEntity对象")
@NoArgsConstructor
@AllArgsConstructor
public class UserEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户id")
    @TableId(value = "id_", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "昵称")
    @TableField("nick_")
    private String nick;

    @ApiModelProperty(value = "用户名")
    @TableField("username_")
    private String username;

    @ApiModelProperty(value = "个人签名")
    @TableField("signature_")
    private String signature;

    @ApiModelProperty(value = "姓名")
    @TableField("name_")
    private String name;

    @ApiModelProperty(value = "身份证编号")
    @TableField("id_card_no_")
    private String idCardNo;

    @ApiModelProperty(value = "头像url")
    @TableField("portrait_")
    private String portrait;

    @ApiModelProperty(value = "用户密码")
    @TableField("password_")
    private String password;

    @ApiModelProperty(value = "账号更新时间")
    @TableField(value = "update_time_", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "账号创建时间")
    @TableField(value = "create_time_", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "delete_", fill = FieldFill.INSERT)
    @TableLogic
    private Integer delete;

    @ApiModelProperty(value = "账号创建人ID")
    @TableField("create_id_")
    private String createId;

    @ApiModelProperty(value = "账号修改人id")
    @TableField("update_id_")
    private String updateId;


}
